package com.jerei.plugin.service.impl;

import com.jerei.plugin.service.IKeepService;
import com.jerei.plugin.utils.JrJdbcTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by sunfeihu on 2016/12/1.
 */
@Service
public class KeepServiceImpl implements IKeepService {

    @Autowired
    private JrJdbcTemplate jrJdbcTemplate;

    @Override
    public Boolean keep() {
        try {
            jrJdbcTemplate.getJdbcTemplate().queryForObject(" select 1 ", Integer.class);
            return true;
        } catch (Exception e) {
            return false;
        }
    }
}
